/**
 * 
 */
package ua.kpi.javatrainee6.model.curriculum;

import ua.kpi.javatrainee6.model.people.*;
import ua.kpi.javatrainee6.model.utils.*;
import ua.kpi.javatrainee6.model.departments.*;

/**
 * SheduleActivity is base entity of Curriculum class
 * curriculum is represented as array of SheduleActivity
 */
public final class SheduleActivity {

	private Group group;
	private Subject subject;
	private Address address;
	private PairOfDay pair;
	private DayOfWeek day;
	
	public SheduleActivity(Group group, Subject subject, Address address, 
			               PairOfDay pair, DayOfWeek day) {
		this.group = group;
		this.subject = subject;
		this.address = address;
		this.pair = pair;
		this.day = day;
	}
	
	public Professor getProfessor() {
		return subject.getProfessor();
	}
	
	public Group getGroup() {
		return group;
	}
	
	@Override
	public String toString() {
		return String.format("Time: %s, %s; Professor: %s; Subject: %s; Group: %s - %s;", pair, 
				             day, getProfessor().getShortDescription(), subject.getTitle(), group.getTitle(), address); 
	}
}

